package com.ruoyi.base.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.base.mapper.BaseTreeMapper;
import com.ruoyi.base.domain.BaseTree;
import com.ruoyi.base.service.IBaseTreeService;

/**
 * 果树操作Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-20
 */
@Service
public class BaseTreeServiceImpl implements IBaseTreeService 
{
    @Autowired
    private BaseTreeMapper baseTreeMapper;

    /**
     * 查询果树操作
     * 
     * @param id 果树操作主键
     * @return 果树操作
     */
    @Override
    public BaseTree selectBaseTreeById(Long id)
    {
        return baseTreeMapper.selectBaseTreeById(id);
    }

    /**
     * 查询果树操作列表
     * 
     * @param baseTree 果树操作
     * @return 果树操作
     */
    @Override
    public List<BaseTree> selectBaseTreeList(BaseTree baseTree)
    {
        return baseTreeMapper.selectBaseTreeList(baseTree);
    }

    /**
     * 新增果树操作
     * 
     * @param baseTree 果树操作
     * @return 结果
     */
    @Override
    public int insertBaseTree(BaseTree baseTree)
    {
        baseTree.setCreateTime(DateUtils.getNowDate());
        return baseTreeMapper.insertBaseTree(baseTree);
    }

    /**
     * 修改果树操作
     * 
     * @param baseTree 果树操作
     * @return 结果
     */
    @Override
    public int updateBaseTree(BaseTree baseTree)
    {
        return baseTreeMapper.updateBaseTree(baseTree);
    }

    /**
     * 批量删除果树操作
     * 
     * @param ids 需要删除的果树操作主键
     * @return 结果
     */
    @Override
    public int deleteBaseTreeByIds(Long[] ids)
    {
        return baseTreeMapper.deleteBaseTreeByIds(ids);
    }

    /**
     * 删除果树操作信息
     * 
     * @param id 果树操作主键
     * @return 结果
     */
    @Override
    public int deleteBaseTreeById(Long id)
    {
        return baseTreeMapper.deleteBaseTreeById(id);
    }
}
